package com.awesome.designpatterndemo.proxy.proxy1;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.awesome.designpatterndemo.R;
/**
 * Author: zhangjingfang
 * Email:zhangjingfang@jeejio.com
 * Date: 2022/7/6
 * Description: 静态代理
 */
public class Proxy1Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_proxy1);
        // 构造一个真实主题
        RealSubject real = new RealSubject();
        // 通过真实主题对象构造一个代理对象
        ProxySubject proxy = new ProxySubject(real);
        // 调用代理的相关方法
        proxy.visit();
    }
}